<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<!DOCTYPE HTML>
<html>
<head>
<title>应许之地——萝卜丝之家</title>
<link rel="stylesheet" type="text/css" href="css/public.css">
<link href="css/detail.css" rel="Stylesheet" type="text/css" />
<link href="css/bottom.css" rel="Stylesheet" type="text/css" />

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/tab_select.js">
</script>
    <script language="javascript">
    $(function(){
    	$.getJSON("listHelpCategory.action", {categoryPid:1} ,function callback(json){
			$("#subCategoryId option").remove();
			$.each(json.helpCategoryJSONArray, function(i,item){
				$("#subCategoryId").append("<option value=\"" + item.id + "\">" + item.categoryName + "</option>");
		     });
		});
    });
    
    	function change(id){
			$.getJSON("listHelpCategory.action", {categoryPid:id} ,function callback(json){
				$("#subCategoryId option").remove();
				$.each(json.helpCategoryJSONArray, function(i,item){
					$("#subCategoryId").append("<option value=\"" + item.id + "\">" + item.categoryName + "</option>");
			     });
			});

		}
		</script>
      
</head>

<body class="user"> 
<div class="main">
	<%@include file = "../include/top.jsp"%>

    <div class="content">
    	<%@include file = "../include/left.jsp"%>
        <div id="publishHelpPage" class="art">
	    	<%@include file = "../include/tab_help.jsp"%>
            <div class="bd">
            	<form action="addHelpInformation.action" method = "post" id = "form" class="send_msg helps">                
                  <p class="addressed"><label>分类：</label><select class="" name = "helpInformation.categoryId" onchange="change(this.options[this.options.selectedIndex].value)"><s:iterator value="helpCategoryList" id="entity"><option value = "${categoryId}">${categoryName}</option></s:iterator></select><select id = "subCategoryId" class="" name = "subCategoryId"></select></p>
                    <p><label>标题：</label><input class="tit_inp" type="text" name = "helpInformation.title" value="" /></p>
                    <p style="padding-bottom:5px;"><label>内 容：</label><FCK:editor instanceName="helpInformation.content" width="500" 
						toolbarSet="Basic">
						<jsp:attribute name="value">
              			  </jsp:attribute>
					</FCK:editor></p>
                    <p><label>联系方式：</label><input class="tel_inp" type="text" name = "helpInformation.contact" value="" /></p>
                    <p><button class="summit" type="submit">发 送</button></p>
                </form>
            </div>
        </div>
    </div>
    <%@include file = "../bottom.jsp"%>
</div>
</body>
</html>
